package org.javaboy.freemarker_thymeleaf_jsp.config;

import org.springframework.web.servlet.view.InternalResourceView;

import java.io.File;
import java.util.Locale;

public class MyInternalResourceView extends InternalResourceView {
    @Override
    public boolean checkResource(Locale locale) throws Exception {
        //这就是 jsp 文件的绝对路径
        File file = new File(getServletContext().getRealPath("/") + getUrl());
        return file.exists();
    }
}
